package com.zhentao.config;

import com.zhentao.filter.WmTokenInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author TonySong
 * @date 2024/6/7 0007
 * @time 10:53
 */
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
       registry.addInterceptor(new WmTokenInterceptor())
               .addPathPatterns("/**");
    }
}
